var $;
  var from;
  layui.use(['form'],function(){
    $=layui.$;
   from=layui.form;
    //下拉框监听事件
    from.on('select(aihao)',function(data){
      var mes=$("#type").val()
      $("#color").css({background:mes})
    })
    
    
  })
  function child(date){
    $("#type").empty();
    $("#type").append("<option value=''>请选择</option>")
    for (let i = 0; i < date.length; i++) {
      $("#type").append("<option value="+date[i].Color+">"+date[i].Name+"</option>")
      
    }
    from.render();
  }
  var CureName=function(){
      var ts=$("#type option:checked").text()
      return ts;
  }